﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="MO.BusinessServer.Web.Login" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>

    <link rel="stylesheet" href="/css/themes/default/jquery.mobile-1.4.2.min.css" />
    <script src="/js/jquery.js"></script>
    <script src="/js/jquery.mobile-1.4.2.min.js"></script>
    <script src="/js/jquery.json.js"></script>
    <script src="/AjaxServiceHandler.ashx"></script>

</head>
<body>
    <div data-role="page" class="jqm-demos" id="panel-fixed-page1" data-title="">

        <div data-role="header" data-position="fixed">
            <h1 id="title_h1">用户登录</h1>
        </div>
        <!-- /header -->
        <div></div>
        <div role="main" class="ui-content jqm-content jqm-fullwidth">
            <form>
                <label for="text_user">用户名:</label>
                <input type="text" name="text_user" id="text_user" value="">
                <label for="text_password">密码:</label>
                <input type="password" name="text_password" id="text_password" value="">
                <input type="button" id="submit_login" value="登录">
            </form>

        </div>
        <!-- /content -->



    </div>
    <!-- /page -->
    <script>

        (function ($) {
            $("#submit_login").click(this, function () {
                var result = Proxy.Login($("#text_user").val(), $("#text_password").val());
                if (result.Result)
                    location.href = "/";
                else
                    alert(result.Message);
            });
        })(jQuery);
        //Proxy.Login("admin", "123");
        //location.href = "/";
    </script>
</body>
</html>
